package com.yq.ylmall.client.order;

import com.yq.ylmall.client.order.fallback.OrderFeignFallback;
import com.yq.ylmall.model.order.OrderInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

@FeignClient(value = "ylmall-service-order", fallback = OrderFeignFallback.class)
public interface OrderFeignClient {

    @PostMapping(value = "/api/order/getOrderInfoByOrderNo/{orderNo}", headers = {"Content-Type: application/json"})
    OrderInfo getOrderInfoByOrderNo(@PathVariable String orderNo);

    @GetMapping(value = "/api/order/update/orderStatus/{orderNo}/{status}")
    void updateOrderStatus(@PathVariable String orderNo, @PathVariable Integer status);

}
